package models;

import play.*;
import play.db.jpa.*;

import javax.persistence.*;
import java.util.*;

/**
 * 
 * @author Islam Al-Aarag
 * @version 1.0
 * 
 */
@Entity
public class Permission extends Model {
	@Lob
	public String description;

	// S@ManyToMany
	// public List<Role> allowedRoles;

	/**
	 * 
	 * @param description
	 *            the description of the permission (what it allows for)
	 */
	public Permission(String description) {
		this.description = description;
		// this.allowedRoles = new ArrayList<Role>();
	}

	/**
	 * @author Ahmed Mahmoud
	 * @return
	 * 
	 */
	public boolean cascadeDelete() {
		this.delete();
		return true;
	}

}
